#!/bin/sh
#
# Author ： hbaolong@vip.qq.com
#
# Function : 这是一个模板
#
#
#

if [ $# -ne 0 ]; then
	echo "Usage: this is a empty shell."
	exit
fi

workdir="/Users/hbaolong/workshop/gitee/3place/dicts/"

exceptdict="/Users/hbaolong/workshop/gitee/3place/ENMYDICT/exceptwords.md"

except_candidate_dict="/Users/hbaolong/workshop/gitee/3place/ENMYDICT/exceptwords_candidate.md"

num_of_dicts=`ls $workdir |sed -e "/bdc.md/d" |wc |awk '{print $1}'`

cd $workdir

echo "All of $num_of_dicts dicts will be update"

for dicts in `find . ! -mnewer $except_candidate_dict |grep md|sed -e "/bdc.md/d"|sort `
do
	formatdict $dicts
done

cat $except_candidate_dict >> $exceptdict

rm -f $except_candidate_dict

touch $except_candidate_dict

echo "All Dicts Up To Date"

